#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char **argv)
{
    char buf[128];

    memset(buf, 0x0, sizeof(buf));

    for(int i=1; i<argc; i++){
        if(-1 == readlink(argv[i], buf, sizeof(buf))){
            perror("readlink error");
            exit(-1);
        }

        printf("symfile -> sourcefile: %s -> %s\n", argv[i], buf);

        memset(buf, 0x0, sizeof(buf));
    }

    exit(0);
}
